package com.rongshe.hotel.domain;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.rongshe.common.annotation.Excel;
import com.rongshe.common.core.domain.BaseEntity;

/**
 * 商品对象 rs_good
 *
 * @author rongshe
 * @date 2025-02-18
 */
public class RsGood extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Long id;

    /**
     * 帐号状态（0正常 1停用）
     */
    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 商品图片
     */
    @Excel(name = "商品图片")
    private String image;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String name;

    /**
     * 已售数量
     */
    @Excel(name = "已售数量")
    private String sold;

    /**
     * 价格
     */
    @Excel(name = "价格")
    private BigDecimal price;

    /**
     * 商品类型
     */
    @Excel(name = "商品类型")
    private String type;

    /**
     * 起购数量
     */
    @Excel(name = "起购数量")
    private String minimum;

    /**
     * 商品规格
     */
    @Excel(name = "商品规格")
    private List<Spec> specs;

    /**
     * 限购数量
     */
    @Excel(name = "限购数量")
    private String limitNum;

    /**
     * 商品分类
     */
    @Excel(name = "商品分类")
    private Long categoryId;

    /**
     * 序号
     */
    @Excel(name = "序号")
    private Long orderNum;

    public static class Spec {
        private Long id;
        private String name;
        private List<Option> options;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<Option> getOptions() {
            return options;
        }

        public void setOptions(List<Option> options) {
            this.options = options;
        }
    }

    public static class Option {
        private Long id;
        private String text;
        private BigDecimal price;

        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public BigDecimal getPrice() {
            return price;
        }

        public void setPrice(BigDecimal price) {
            this.price = price;
        }
    }

    private Integer count;

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    /**
     * 商品规格信息
     */
    private List<RsGoodUnit> rsGoodUnitList;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getImage() {
        return image;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setSold(String sold) {
        this.sold = sold;
    }

    public String getSold() {
        return sold;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setMinimum(String minimum) {
        this.minimum = minimum;
    }

    public String getMinimum() {
        return minimum;
    }

    public List<Spec> getSpecs() {
        return specs;
    }

    public void setSpecs(List<Spec> specs) {
        this.specs = specs;
    }

    public void setLimitNum(String limitNum) {
        this.limitNum = limitNum;
    }

    public String getLimitNum() {
        return limitNum;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setOrderNum(Long orderNum) {
        this.orderNum = orderNum;
    }

    public Long getOrderNum() {
        return orderNum;
    }

    public List<RsGoodUnit> getRsGoodUnitList() {
        return rsGoodUnitList;
    }

    public void setRsGoodUnitList(List<RsGoodUnit> rsGoodUnitList) {
        this.rsGoodUnitList = rsGoodUnitList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("image", getImage())
                .append("name", getName())
                .append("sold", getSold())
                .append("price", getPrice())
                .append("type", getType())
                .append("minimum", getMinimum())
                .append("specs", getSpecs())
                .append("limitNum", getLimitNum())
                .append("categoryId", getCategoryId())
                .append("orderNum", getOrderNum())
                .append("rsGoodUnitList", getRsGoodUnitList())
                .toString();
    }
}
